#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：10.线程方法-current_thread().py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-10-31 15:01
'''
import time
import threading


def work():
    name = threading.current_thread().name
    time.sleep(1)
    print(name)

for i in range(5):
    t = threading.Thread(target=work)
    # t.name = f"线程：{i}"
    t.start()

t = threading.current_thread()
print(t.name)